package com.koron.order.common.bean.base;

/**
 * @ClassName JurisdictionUserType
 * @description
 * @Author zhouj
 * @Date 2022/3/12 15:52
 */
public enum JurisdictionUserType {

    all("all", "所有人"),
    creater("creater", "创建人"),
    createOrg("createOrg", "创建单位用户"),
    deptManageOrg("deptManageOrg", "设备管理单位用户"),
    workFlowAudit("workFlowAudit", "派工责任人"),
    deptWorkUser("deptWorkUser", "工作负责人"),
    worker("worker", "工作班成员"),
    leader("leader", "工作跟踪负责人"),
    leaderOrWorkerOrg("leaderOrWorkerOrg", "工作跟踪负责人单位用户或作业单位用户"),
    workOrg("workOrg","工作班组单位");

    private String code;
    private String desc;

    JurisdictionUserType(String var1, String var2) {
        this.code = var1;
        this.desc = var2;
    }


    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(String code) {
        switch (code) {
            case "all":
                return all.desc;
            case "creater":
                return creater.desc;
            case "createOrg":
                return createOrg.desc;
            case "deptManageOrg":
                return deptManageOrg.desc;
            case "workFlowAudit":
                return workFlowAudit.desc;
            case "deptWorkUser":
                return deptWorkUser.desc;
            case "worker":
                return worker.desc;
            case "leader":
                return leader.desc;
            case "leaderOrWorkerOrg":
                return leaderOrWorkerOrg.desc;
            case "workOrg":
                return workOrg.desc;
            default:
                return null;
        }
    }

}
